#ifndef __QUEUE_OPERATION__
#define __QUEUE_OPERATION__

#include "IUtility.h"
#include "IContainer.h"
#include "IThreadPoolManager.h"
#include "ISysResources.h"


class CQueueOperation : public virtual IQueueOperation
{
INIT_CLASS_SINGLETON(CQueueOperation)
public:
    const bool IsQueueExist(const char * pszQueueName);
	bool CreateQueue(const char * pszQueueName, int iQueueType = 1);
	bool FreeQueue(const char * pszQueueName);
    
    bool PushTask(const char * pszQueueName, const char * pszTask, int iQueueKey = -1);
    bool PushTask(const char * pszQueueName, IData * ptrTask, int iQueueKey = -1);
    IData * PopTask(const char * pszQueueName);
	int QueueKey(const char * pszQueueName);
    bool EmptyQueue(const char * pszQueueName);
	bool FlipQueueKey(const char * pszQueueName);

private:
	IQueue * Queue(const char * pszName);
};

#endif//__QUEUE_OPERATION__